<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import YesNoEnum from '@/infra/constant/YesNoEnum'
import { merchantReturnAddressApi } from '@/feature/mct/infra/api/merchantReturnAddressApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: merchantReturnAddressApi,
        columns: [
          {
            label: '',
            prop: 'merchantId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '收件人',
            prop: 'username'
          },
          {
            label: '省',
            prop: 'province'
          },
          {
            label: '是否默认地址',
            prop: 'defaultFlag',
            type: ColumnType.RADIO,
            options: YesNoEnum
          },
          {
            label: '手机号',
            prop: 'telephone'
          },
          {
            label: '市',
            prop: 'city'
          },
          {
            label: '区',
            prop: 'region'
          },
          {
            label: '详细地址',
            prop: 'detailAddress'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

